# user/urls.py
from django.urls import path, include

from rest_framework import routers
from rest_framework.routers import DefaultRouter

from user.views import LogInView, LogOutView, ModifyPwdView, CreateUserProfileView, \
	UpdateUserProfileView, GetUserProfileListView, GetUserProfileByNameView, DeleteUserView

app_name = 'users'

urlpatterns = [
	path('login', LogInView.as_view(),name='login'),
	path('logout', LogOutView.as_view(),name='logout'),
	path('modify_pwd', ModifyPwdView.as_view(),name='modify_pwd'),
	path('delete_user', DeleteUserView.as_view(),name='delete_user'),
]
router = routers.SimpleRouter()
router.register(r'add_user', CreateUserProfileView)
router.register(r'update_user', UpdateUserProfileView)
router.register(r'get_user_list', GetUserProfileListView)
router.register(r'get_user_by_name', GetUserProfileByNameView)
urlpatterns += router.urls